﻿using System;

namespace BSharp.Compiler.Emit
{
	public class CallDirect : IntermediateInstruction
	{
		public readonly int Parameters;
		public readonly SymbolReference Target;

		public CallDirect (SymbolReference target, int paramCount)
		{
			Target = target;
			Parameters = paramCount;
		}

		public override void Visit (IntermediateCompiler compiler)
		{
			compiler.Compile (this);
		}

		public override string ToString ()
		{
			return string.Format ("CALL {0}", Target.SymbolName);
		}
	}
}

